Prerequisites
Source Database
The source database ARCHIVESSOURCE is the database on which OIPA application is running and from which the data will be archived.
Make sure the below changes are present in source database:
-
SUBSTATUSCODE column from ASACTIVITY table has been renamed to ARCHIVALSTAUSCODE (10) (The liquibase file "pas.database/updates/12.0.0.0/2022-09-12_OIPAJ-19433.xml" contains the change and it should be ran successfully - verify in databasechangelog table).
-
STATUSCODE column length from ASACTIVITY table has been changed from 2 char to 10 char (The liquibase file "pas.database/updates/12.0.0.0/2022-10-11_OIPAJ-21390.xml" contains the change and it should be ran successfully - verify in databasechangelog table)
Make sure the archive & retrieval related tables and procedures created in source database
Tables:
|
ARCHIVE SOURCE |
|---|
ARCHIVE ARCHIVE_BATCH ARCHIVE_BATCH_ENTITYGUIDS ARCHIVE_ACTIVITY_DETAIL ARCHIVE_ERROR ARCHIVE_LOG TMP_ARCHIVE_ENTITY_ACTIVITY RETRIEVE RETRIEVE_ACTIVITY_DETAILS RETRIEVE_ENTITYGUIDS RETRIEVE_ERROR TMP_RETRIEVE_ENTITY_ACTIVITY |
Procedures:
|
ARCHIVE SOURCE |
|---|
SP_CREATE_ARCHIVE SP_POPULATE_ARCHIVE_METADATA SP_CREATE_RETRIEVE |
Index Recommendations at Source
Execute the below at source to create the index.
|
ARCHIVE SOURCE |
|---|
CREATE INDEX IX_1_ASACTIVITYSPAWN ON ASACTIVITYSPAWN(SPAWNEDBYGUID,ACTIVITYGUID); |
Target Database
The target database "ARCHIVESTARGET" is the database to which the archived data will be moved.
Create a new schema for target database to where the records from source will be moved and make sure tables can be created on that. The new schema can be in the same instance or a separate instance. Use the below commands to create a target schema
Extract the archival distribution. The extracted folder is referred to as <ARCHIVAL_HOME>.
Linux file permissions: After extracting or copying the Archival distribution on Linux, run the following commands to ensure the deployment user can access the required directories and files:
find "$ARCHIVAL_HOME" -type d -exec chmod 755 {} \;find "$ARCHIVAL_HOME" -type f -exec chmod 644 {} \;
|
Oracle
create user ARCH_TARGET identified by ARCH_TARGET; grant connect, resource to ARCH_TARGET; grant UNLIMITED TABLESPACE to ARCH_TARGET; |
MSSQL Server
Create following database:
ARCH_TARGET - user with full privileges.
DB2
Create the below database:
ARCH_TARGET - user with full privileges.